package com.ybwh.springboot2.mytransaction;

import lombok.extern.slf4j.Slf4j;
import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.springframework.core.annotation.Order;

/**
 * 自定义注解的aop
 *
 *
 * @author fanbeibei
 * @version 1.0
 * @date 2021/9/6 15:43
 */
@Slf4j
@Aspect
@Order(-1)
public class MyTransactionalAop {
    @Around(value = "@annotation(com.ybwh.springboot2.mytransaction.MyTransactional)")
    public Object execute(ProceedingJoinPoint joinPoint) throws Throwable {

        Object result = joinPoint.proceed();
        return result;
    }

}
